Generally, the amount of data used to represent motion video data is very large. Accordingly, an apparatus handling such motion video data compresses the motion video data by using high-efficiency coding before transmitting the motion video data to another apparatus or before storing the motion video data in a storage device. “High-efficiency coding” refers to a coding process that converts a certain data stream to another data stream and thereby compresses the amount of data of the original data stream.
Coding standards such as MPEG-2 (Moving Picture Experts Group Phase 2), MPEG-4, and H.264 MPEG-4 Advanced Video Coding (MPEG-4 AVC/H.264), devised by the International Standardization Organization/International Electrotechnical Commission (ISO/IEC), are typical motion video coding standards widely used today.
Predictive coding is employed in such coding standards. In predictive coding, each picture to be encoded is divided into a plurality of blocks. Then, a prediction error image representing pixel-by-pixel errors between the block being encoded among the plurality of blocks and the predicted image of that block is computed. The prediction error image is then orthogonal-transformed to obtain frequency coefficients representing the frequency components of the image. After that, quantized coefficients obtained by quantizing the frequency coefficients are entropy-coded. By applying such quantization and entropy coding, the amount of data needed to represent the motion video is reduced.
In order to reduce the amount of data as much as possible while minimizing the degradation of picture quality of motion video data due to coding, it is important that the quantization levels used to quantize the frequency coefficients be properly determined. For the frequency coefficients obtained by orthogonal-transforming the prediction error image, it is known that the distribution of the frequency coefficients having a positive sign and the distribution of the frequency coefficients having a negative sign become substantially symmetrical with respect to each other. A technique for properly setting the quantization levels for such a probability distribution symmetrical about the center, for example, a Laplacian distribution or a Gaussian distribution has been proposed (refer, for example, to M. D. Paez, T. H. Glisson, “Minimum Mean-Squared-Error Quantization in Speech PCM and DPCM systems,” IEEE TRANSACTIONS ON COMMUNICATIONS, pp. 225-230, April 1972).
A technique that uses the Lloyd-Max algorithm in order to optimize the quantization levels used to quantize symbols having an arbitrary probability distribution has also been proposed (refer, for example, to Matthew I. Noah, “Optimal Lloyd-Max quantization of LPC speech parameters,” Acoustics, Speech, and Signal Processing, IEEE International Conference on ICASSP, pp. 29-32, 1984).